<?php
/**
 * Created by IntelliJ IDEA.
 * User: iqny
 * Date: 2019-01-31
 * Time: 10:47
 */
$api = app('Dingo\Api\Routing\Router');
$api->version('v1',
    [
        'namespace' => 'App\Http\Controllers\Api\V1',
        'middleware' => [
            'cors',
            'api.throttle'
        ],
        'limit' => 20, 'expires' => 1
    ], function (Dingo\Api\Routing\Router $api) {
        $api->group(['middleware' => 'api.auth'], function (Dingo\Api\Routing\Router $api) {
            $api->post('me', 'AuthController@me');
        });
        $api->get('/test', 'TestController@test');
        $api->post('login', 'AuthController@login');
        $api->post('logout', 'AuthController@logout');
        $api->post('refresh', 'AuthController@refresh');
    }
);
